import http from "@/api";

/**
 * 专辑分页列表
 */
export const albumPageListApi = (params: object) => {
    return http.get(`/album/paging`, params);
};

/**
 * 新增专辑
 * @param params
 */
export const addAlbumApi = (params: object) => {
    return http.post(`/album/add`, params);
};

/**
 * 编辑专辑
 * @param params
 */
export const editAlbumApi = (params: any) => {
    return http.put(`/album/edit/${params.id}`, params);
};

/**
 * 切换专辑状态
 * @param id
 */
export const changeStatusApi = (id: number) => {
    return http.put(`/album/change_status/${id}`);
};

/**
 * 修改排序
 * @param params
 */
export const changeSortApi = (params: object) => {
    return http.post(`/album/changeSort`, params);
};

/**
 * 删除专辑
 * @param id
 */
export const deleteAlbumByIdApi = (id: number) => {
    return http.delete(`/album/delete/${id}`);
};

/**
 * 批量删除
 * @param params
 */
export const deleteAlbumApi = (params: object) => {
    return http.post(`/album/delete`, params);
};
